-
Notifications
You must be signed in to change notification settings - Fork 14k
cleanup: merge RvalueScopes into ScopeTree
#148658
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
cleanup: merge `RvalueScopes` into `ScopeTree`
This comment has been minimized.
This comment has been minimized.
|
💥 Test timed out after |
This removes some unneeded indirection and consolidates the logic for scope resolution.
dc5405c to
0e50d5a
Compare
|
Retrying CI since #t-infra > CI keeps failing because of npm error seems to be fixed. Not sure what's up with the bors2 timeout but let's try that again too I guess? @bors try |
This comment has been minimized.
This comment has been minimized.
cleanup: merge `RvalueScopes` into `ScopeTree`
This comment has been minimized.
This comment has been minimized.
|
Finished benchmarking commit (03a6515): comparison URL. Overall result: ❌✅ regressions and improvements - please read the text belowBenchmarking this pull request means it may be perf-sensitive – we'll automatically label it not fit for rolling up. You can override this, but we strongly advise not to, due to possible changes in compiler perf. Next Steps: If you can justify the regressions found in this try perf run, please do so in sufficient writing along with @bors rollup=never Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
Max RSS (memory usage)Results (primary 4.3%, secondary -1.5%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (primary 2.6%, secondary 6.0%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 475.105s -> 475.535s (0.09%) |
|
So that's where the I do have an couple ideas that could improve perf both here and for realistic code, but they're not pretty. Reifying the scope hierarchy isn't really necessary, and there's a few ways to avoid it; e.g.:
Another option: we remove the |
This gets rid of
RvalueCandidate, inlines the definition ofRvalueScopesintoScopeTree, and removes twoRvalueScopes-specific modules, consolidating the scoping logic a bit. Removing the extra step of going fromRvalueCandidates toRvalueScopesand removing the duplication between them should also hopefully improve perf.I've also taken the liberty of doing a bit of renaming and comment updates, changing some "rvalue scope"s to "extended temporary scope"s. This is a bit closer to the Reference's terminology and makes it clearer that it's specific to temporary lifetime extension. This isn't comprehensive. In particular, I've left
record_rvalue_scope_if_borrow_expruntouched since #146098 gets rid of it.Pulled out from #146098.
r? BoxyUwU as the reviewer of #146098 (though feel free to reassign/claim! this is just cleanup)
cc @dingxiangfei2009